//
//  DLTableBarViewController.m
//  play
//
//  Created by 李鹭 on 16/3/28.
//  Copyright © 2016年 李鹭. All rights reserved.
//

#import "DLTableBarViewController.h"
#import "ViewController.h"
#import "DLTestViewController.h"
#import "DLTableViewController.h"

@interface DLTableBarViewController ()

@end

@implementation DLTableBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor yellowColor];
    
    NSArray *controllerNames = @[@"ViewController", @"DLTestViewController", @"DLTableViewController"];
    NSMutableArray *viewControllers = [NSMutableArray array];
    [controllerNames enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        UIViewController *controller = [[NSClassFromString(obj) alloc] init];
        controller.view.frame = [UIScreen mainScreen].bounds;
        [viewControllers addObject:controller];
    }];
    self.viewControllers = viewControllers;
    self.selectedIndex = 0;
    
    
    NSMutableArray *obj = [NSMutableArray arrayWithCapacity:8];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    [obj addObject:@"1"];
    
    
    
    //yghjkl;'fghjkl;'lfghjkl;'
    NSLog(@"%lu", (unsigned long)obj.count);

    // Do any additional setup after loading the view.
}

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
    
    
    
}

@end
